package org.lq.his.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.lq.his.dao.DrugDao;
import org.lq.his.pojo.Drug;
import org.lq.his.service.DrugService;
import org.springframework.stereotype.Service;

@Service("drugService")
public class drugServiceImpl implements DrugService {
	@Resource
	private DrugDao drugdao;
	

	public void setDrugdao(DrugDao drugdao) {
		this.drugdao = drugdao;
	}

	@Override
	public List<Drug> getListByCondition(int start, int limit, Drug condition, String column, String orderBy) {
		
		return drugdao.getListByCondition(start, limit, condition, column, orderBy);
	}

	@Override
	public int getCountByCondition(Drug condition) {
		
		return drugdao.getCountByCondition(condition);
	}

	@Override
	public void add(Drug drug) {
		drugdao.add(drug);
		
	}

	@Override
	public void update(Drug drug) {
		drugdao.update(drug);
		
	}

	@Override
	public Drug getById(Integer id) {
		return drugdao.getById(id);
	}

	@Override
	public void deleteDrug(Integer[] ids) {
		drugdao.deleteByIds(ids);
	}

	@Override
	public List<Drug> getDrugsByPrescribeId(Integer prescribeId) {

		return drugdao.getDrugsByPrescribeId(prescribeId);
	}



	

}
